<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="example-1">
        <ul>
            <li v-for="item in items" :key="item.message">
                {{ item.message }}
            </li>
        </ul>
        <ul>
            <li v-for="(item, index) in items">
                {{ parentMessage }} - {{ index }} - {{ item.message }}
            </li>
        </ul>
        <div v-for="(value, name, index) in object">
            {{ index }}. {{ name }}: {{ value }}
        </div>

        <li v-for="n in evenNumbers">{{ n }}</li>\
        <ul v-for="set in sets">
            <li v-for="n in even(set)">{{ n }}</li>
        </ul>
        <div>
            <span v-for="n in 10">{{ n }} </span>
        </div>
        <ul>
            <template v-for="item in items">
                <li>{{ item.msg }}</li>
                <li class="divider" role="presentation">1</li>
            </template>
        </ul>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var example1 = new Vue({
            el: '#example-1',
            data: {
                parentMessage: ' parent',
                items: [
                    { message: 'Foo' },
                    { message: 'Bar' }
                ],
                object: {
                    title: 'How to do lists in Vue',
                    author: 'Jane Doe',
                    publishedAt: '2016-04-10'
                },
                numbers: [1, 2, 3, 4, 5],
                sets: [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]
            },
            computed: {
                evenNumbers: function () {
                    return this.numbers.filter(function (number) {
                        return number % 2 === 0
                    })
                }
            },
            methods: {
                even: function (numbers) {
                    return numbers.filter(function (number) {
                        return number % 2 === 0
                    })
                }
            }
        })
    </script>
</body>

</html>